package cn.anlaser.type;

public enum GenFileName {
	original("original", "原始文件名"), timestamp("timestamp", "时间戳命名"), appoint(
			"appoint", "指定文件");
	private String code;
	private String title;

	GenFileName(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static GenFileName findByCode(String code) {
		for (GenFileName obj : GenFileName.values()) {
			if (obj.getCode().equals(code)) {
				return obj;
			}
		}
		return null;
	}
}
